import React, { useState } from "react";
import { Tabs } from "react-vant";
import List from "./components/list";
import ListAdd from "./components/listAdd";
import { FVContext, MyContext } from "./context";
import './App.css'
const App = () => {
  const [list, setList] = useState([
    {
      id: "1234567876543",
      title: '苹果手机15',
      price: 6999,
      type: 1,
      typeName: '支出'
    },
    {
      id: "876543245654",
      title: '送外卖',
      price: 200,
      type: 2,
      typeName: '收入'
    }
  ])
  return (
    <div>
      <MyContext.Provider value={{ list, setList }}>
        <FVContext.Provider value={"fcContext"}>
          <Tabs>
            <Tabs.TabPane title="列表">
              <List></List>
            </Tabs.TabPane>
            <Tabs.TabPane title="添加">
              <ListAdd></ListAdd>
            </Tabs.TabPane>
          </Tabs>
        </FVContext.Provider>
      </MyContext.Provider>
    </div>
  );
};

export default App;
